<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkBox</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 3 参考手册">
<link rel="up" href="LayoutContainers.html" title="布局容器">
<link rel="prev" href="gtk3-GtkAspectFrame.html" title="GtkAspectFrame">
<link rel="next" href="gtk3-GtkHBox.html" title="GtkHBox">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gtk3-GtkAspectFrame.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="LayoutContainers.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 3 参考手册</th>
<td><a accesskey="n" href="gtk3-GtkHBox.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gtk3-GtkBox.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gtk3-GtkBox.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gtk3-GtkBox"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk3-GtkBox.top_of_page"></a>GtkBox</span></h2>
<p>GtkBox — Base class for box containers</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gtk3-GtkBox.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

struct              <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox">GtkBox</a>;
<a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="gtk3-GtkBox.html#gtk-box-new" title="gtk_box_new ()">gtk_box_new</a>                         (<em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkOrientation" title="enum GtkOrientation"><span class="type">GtkOrientation</span></a> orientation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> spacing</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkBox.html#gtk-box-pack-start" title="gtk_box_pack_start ()">gtk_box_pack_start</a>                  (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expand</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fill</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> padding</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkBox.html#gtk-box-pack-end" title="gtk_box_pack_end ()">gtk_box_pack_end</a>                    (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expand</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fill</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> padding</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkBox.html#gtk-box-get-homogeneous" title="gtk_box_get_homogeneous ()">gtk_box_get_homogeneous</a>             (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkBox.html#gtk-box-set-homogeneous" title="gtk_box_set_homogeneous ()">gtk_box_set_homogeneous</a>             (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> homogeneous</code></em>);
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="gtk3-GtkBox.html#gtk-box-get-spacing" title="gtk_box_get_spacing ()">gtk_box_get_spacing</a>                 (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()">gtk_box_set_spacing</a>                 (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> spacing</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkBox.html#gtk-box-reorder-child" title="gtk_box_reorder_child ()">gtk_box_reorder_child</a>               (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> position</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkBox.html#gtk-box-query-child-packing" title="gtk_box_query_child_packing ()">gtk_box_query_child_packing</a>         (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *expand</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fill</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *padding</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> *pack_type</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkBox.html#gtk-box-set-child-packing" title="gtk_box_set_child_packing ()">gtk_box_set_child_packing</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expand</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fill</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> padding</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> pack_type</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gtk3-GtkBox.description"></a><h2>Description</h2>
<p>
GtkBox is an widget which encapsulates functionality for a
particular kind of container, one that organizes a variable number of
widgets into a rectangular area.  GtkBox has a number of derived
classes, e.g. <a class="link" href="gtk3-GtkHBox.html#GtkHBox" title="struct GtkHBox"><span class="type">GtkHBox</span></a> and <a class="link" href="gtk3-GtkVBox.html#GtkVBox" title="struct GtkVBox"><span class="type">GtkVBox</span></a>.
</p>
<p>
The rectangular area of a GtkBox is organized into either a single row
or a single column of child widgets depending upon whether the box is
of type <a class="link" href="gtk3-GtkHBox.html#GtkHBox" title="struct GtkHBox"><span class="type">GtkHBox</span></a> or <a class="link" href="gtk3-GtkVBox.html#GtkVBox" title="struct GtkVBox"><span class="type">GtkVBox</span></a>, respectively.  Thus, all children of a
GtkBox are allocated one dimension in common, which is the height of a
row, or the width of a column.
</p>
<p>
GtkBox uses a notion of <span class="emphasis"><em>packing</em></span>.  Packing
refers to adding widgets with reference to a particular position in a
<a class="link" href="gtk3-GtkContainer.html#GtkContainer" title="struct GtkContainer"><span class="type">GtkContainer</span></a>.  For a GtkBox, there are two reference positions: the
<span class="emphasis"><em>start</em></span> and the <span class="emphasis"><em>end</em></span> of the box.
For a <a class="link" href="gtk3-GtkVBox.html#GtkVBox" title="struct GtkVBox"><span class="type">GtkVBox</span></a>, the start is defined as the top of the box and the end is
defined as the bottom.  For a <a class="link" href="gtk3-GtkHBox.html#GtkHBox" title="struct GtkHBox"><span class="type">GtkHBox</span></a> the start is defined as the
left side and the end is defined as the right side.
</p>
<p>
Use repeated calls to <a class="link" href="gtk3-GtkBox.html#gtk-box-pack-start" title="gtk_box_pack_start ()"><code class="function">gtk_box_pack_start()</code></a> to pack widgets into a
GtkBox from start to end.  Use <a class="link" href="gtk3-GtkBox.html#gtk-box-pack-end" title="gtk_box_pack_end ()"><code class="function">gtk_box_pack_end()</code></a> to add widgets from
end to start.  You may intersperse these calls and add widgets from
both ends of the same GtkBox.
</p>
<p>
Because GtkBox is a <a class="link" href="gtk3-GtkContainer.html#GtkContainer" title="struct GtkContainer"><span class="type">GtkContainer</span></a>, you may also use
<a class="link" href="gtk3-GtkContainer.html#gtk-container-add" title="gtk_container_add ()"><code class="function">gtk_container_add()</code></a> to insert widgets into the box, and they will be
packed with the default values for <span class="type">"expand"</span> and <span class="type">"fill"</span>.
Use <a class="link" href="gtk3-GtkContainer.html#gtk-container-remove" title="gtk_container_remove ()"><code class="function">gtk_container_remove()</code></a> to remove widgets from the GtkBox.
</p>
<p>
Use <a class="link" href="gtk3-GtkBox.html#gtk-box-set-homogeneous" title="gtk_box_set_homogeneous ()"><code class="function">gtk_box_set_homogeneous()</code></a> to specify whether or not all children
of the GtkBox are forced to get the same amount of space.
</p>
<p>
Use <a class="link" href="gtk3-GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()"><code class="function">gtk_box_set_spacing()</code></a> to determine how much space will be
minimally placed between all children in the GtkBox. Note that
spacing is added <span class="emphasis"><em>between</em></span> the children, while
padding added by <a class="link" href="gtk3-GtkBox.html#gtk-box-pack-start" title="gtk_box_pack_start ()"><code class="function">gtk_box_pack_start()</code></a> or <a class="link" href="gtk3-GtkBox.html#gtk-box-pack-end" title="gtk_box_pack_end ()"><code class="function">gtk_box_pack_end()</code></a> is added
<span class="emphasis"><em>on either side</em></span> of the widget it belongs to.
</p>
<p>
Use <a class="link" href="gtk3-GtkBox.html#gtk-box-reorder-child" title="gtk_box_reorder_child ()"><code class="function">gtk_box_reorder_child()</code></a> to move a GtkBox child to a different
place in the box.
</p>
<p>
Use <a class="link" href="gtk3-GtkBox.html#gtk-box-set-child-packing" title="gtk_box_set_child_packing ()"><code class="function">gtk_box_set_child_packing()</code></a> to reset the <span class="type">"expand"</span>,
<span class="type">"fill"</span> and <span class="type">"padding"</span> child properties.
Use <a class="link" href="gtk3-GtkBox.html#gtk-box-query-child-packing" title="gtk_box_query_child_packing ()"><code class="function">gtk_box_query_child_packing()</code></a> to query these fields.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>
Note that a single-row or single-column <a class="link" href="gtk3-GtkGrid.html#GtkGrid" title="struct GtkGrid"><span class="type">GtkGrid</span></a> provides exactly the
same functionality as <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>.
</p>
</div>
<p>
</p>
</div>
<div class="refsect1">
<a name="gtk3-GtkBox.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkBox"></a><h3>struct GtkBox</h3>
<pre class="programlisting">struct GtkBox {
  GtkContainer container;
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-new"></a><h3>gtk_box_new ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_box_new                         (<em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkOrientation" title="enum GtkOrientation"><span class="type">GtkOrientation</span></a> orientation</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> spacing</code></em>);</pre>
<p>
Creates a new <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>orientation</code></em> :</span></p></td>
<td>the box's orientation.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>spacing</code></em> :</span></p></td>
<td>子控件之间间隔的像素值。</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 3.0</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-pack-start"></a><h3>gtk_box_pack_start ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_box_pack_start                  (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expand</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fill</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> padding</code></em>);</pre>
<p>
Adds <em class="parameter"><code>child</code></em> to <em class="parameter"><code>box</code></em>, packed with reference to the start of <em class="parameter"><code>box</code></em>.
The <em class="parameter"><code>child</code></em> is packed after any other child packed with reference
to the start of <em class="parameter"><code>box</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
<td>the <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> to be added to <em class="parameter"><code>box</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>expand</code></em> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the new child is to be given extra space allocated
to <em class="parameter"><code>box</code></em>. The extra space will be divided evenly between all children
that use this option</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fill</code></em> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if space given to <em class="parameter"><code>child</code></em> by the <em class="parameter"><code>expand</code></em> option is
actually allocated to <em class="parameter"><code>child</code></em>, rather than just padding it.  This
parameter has no effect if <em class="parameter"><code>expand</code></em> is set to <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.  A child is
always allocated the full height of a <a class="link" href="gtk3-GtkHBox.html#GtkHBox" title="struct GtkHBox"><span class="type">GtkHBox</span></a> and the full width
of a <a class="link" href="gtk3-GtkVBox.html#GtkVBox" title="struct GtkVBox"><span class="type">GtkVBox</span></a>. This option affects the other dimension</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>padding</code></em> :</span></p></td>
<td>extra space in pixels to put between this child and its
neighbors, over and above the global amount specified by
<span class="type">"spacing"</span> property.  If <em class="parameter"><code>child</code></em> is a widget at one of the
reference ends of <em class="parameter"><code>box</code></em>, then <em class="parameter"><code>padding</code></em> pixels are also put between
<em class="parameter"><code>child</code></em> and the reference edge of <em class="parameter"><code>box</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-pack-end"></a><h3>gtk_box_pack_end ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_box_pack_end                    (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expand</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fill</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> padding</code></em>);</pre>
<p>
Adds <em class="parameter"><code>child</code></em> to <em class="parameter"><code>box</code></em>, packed with reference to the end of <em class="parameter"><code>box</code></em>.
The <em class="parameter"><code>child</code></em> is packed after (away from end of) any other child
packed with reference to the end of <em class="parameter"><code>box</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
<td>the <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> to be added to <em class="parameter"><code>box</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>expand</code></em> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the new child is to be given extra space allocated
to <em class="parameter"><code>box</code></em>. The extra space will be divided evenly between all children
of <em class="parameter"><code>box</code></em> that use this option</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fill</code></em> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if space given to <em class="parameter"><code>child</code></em> by the <em class="parameter"><code>expand</code></em> option is
actually allocated to <em class="parameter"><code>child</code></em>, rather than just padding it.  This
parameter has no effect if <em class="parameter"><code>expand</code></em> is set to <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.  A child is
always allocated the full height of a <a class="link" href="gtk3-GtkHBox.html#GtkHBox" title="struct GtkHBox"><span class="type">GtkHBox</span></a> and the full width
of a <a class="link" href="gtk3-GtkVBox.html#GtkVBox" title="struct GtkVBox"><span class="type">GtkVBox</span></a>.  This option affects the other dimension</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>padding</code></em> :</span></p></td>
<td>extra space in pixels to put between this child and its
neighbors, over and above the global amount specified by
<span class="type">"spacing"</span> property.  If <em class="parameter"><code>child</code></em> is a widget at one of the
reference ends of <em class="parameter"><code>box</code></em>, then <em class="parameter"><code>padding</code></em> pixels are also put between
<em class="parameter"><code>child</code></em> and the reference edge of <em class="parameter"><code>box</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-get-homogeneous"></a><h3>gtk_box_get_homogeneous ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_box_get_homogeneous             (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);</pre>
<p>
Returns whether the box is homogeneous (all children are the
same size). See <a class="link" href="gtk3-GtkBox.html#gtk-box-set-homogeneous" title="gtk_box_set_homogeneous ()"><code class="function">gtk_box_set_homogeneous()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the box is homogeneous.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-set-homogeneous"></a><h3>gtk_box_set_homogeneous ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_box_set_homogeneous             (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> homogeneous</code></em>);</pre>
<p>
Sets the <span class="type">"homogeneous"</span> property of <em class="parameter"><code>box</code></em>, controlling
whether or not all children of <em class="parameter"><code>box</code></em> are given equal space
in the box.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>homogeneous</code></em> :</span></p></td>
<td>a boolean value, <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to create equal allotments,
<a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> for variable allotments</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-get-spacing"></a><h3>gtk_box_get_spacing ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gtk_box_get_spacing                 (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);</pre>
<p>
Gets the value set by <a class="link" href="gtk3-GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()"><code class="function">gtk_box_set_spacing()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>spacing between children</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-set-spacing"></a><h3>gtk_box_set_spacing ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_box_set_spacing                 (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> spacing</code></em>);</pre>
<p>
Sets the <span class="type">"spacing"</span> property of <em class="parameter"><code>box</code></em>, which is the
number of pixels to place between children of <em class="parameter"><code>box</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>spacing</code></em> :</span></p></td>
<td>the number of pixels to put between children</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-reorder-child"></a><h3>gtk_box_reorder_child ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_box_reorder_child               (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> position</code></em>);</pre>
<p>
Moves <em class="parameter"><code>child</code></em> to a new <em class="parameter"><code>position</code></em> in the list of <em class="parameter"><code>box</code></em> children.
The list is the <em class="structfield"><code>children</code></em> field of
<span class="type">GtkBox</span>, and contains both widgets packed <a class="link" href="gtk3-Standard-Enumerations.html#GTK-PACK-START:CAPS"><span class="type">GTK_PACK_START</span></a>
as well as widgets packed <a class="link" href="gtk3-Standard-Enumerations.html#GTK-PACK-END:CAPS"><span class="type">GTK_PACK_END</span></a>, in the order that these
widgets were added to <em class="parameter"><code>box</code></em>.
</p>
<p>
A widget's position in the <em class="parameter"><code>box</code></em> children list determines where
the widget is packed into <em class="parameter"><code>box</code></em>.  A child widget at some position
in the list will be packed just after all other widgets of the
same packing type that appear earlier in the list.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
<td>the <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> to move</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td>the new position for <em class="parameter"><code>child</code></em> in the list of children
of <em class="parameter"><code>box</code></em>, starting from 0. If negative, indicates the end of
the list</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-query-child-packing"></a><h3>gtk_box_query_child_packing ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_box_query_child_packing         (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *expand</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *fill</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *padding</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> *pack_type</code></em>);</pre>
<p>
Obtains information about how <em class="parameter"><code>child</code></em> is packed into <em class="parameter"><code>box</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
<td>the <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> of the child to query</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>expand</code></em> :</span></p></td>
<td>pointer to return location for <span class="type">"expand"</span> child
property. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fill</code></em> :</span></p></td>
<td>pointer to return location for <span class="type">"fill"</span> child
property. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>padding</code></em> :</span></p></td>
<td>pointer to return location for <span class="type">"padding"</span>
child property. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pack_type</code></em> :</span></p></td>
<td>pointer to return location for <span class="type">"pack-type"</span>
child property. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-box-set-child-packing"></a><h3>gtk_box_set_child_packing ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_box_set_child_packing           (<em class="parameter"><code><a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expand</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> fill</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> padding</code></em>,
                                                         <em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> pack_type</code></em>);</pre>
<p>
Sets the way <em class="parameter"><code>child</code></em> is packed into <em class="parameter"><code>box</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkBox.html#GtkBox" title="struct GtkBox"><span class="type">GtkBox</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
<td>the <a class="link" href="gtk3-GtkWidget.html#GtkWidget" title="GtkWidget"><span class="type">GtkWidget</span></a> of the child to set</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>expand</code></em> :</span></p></td>
<td>the new value of the <span class="type">"expand"</span> child property</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fill</code></em> :</span></p></td>
<td>the new value of the <span class="type">"fill"</span> child property</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>padding</code></em> :</span></p></td>
<td>the new value of the <span class="type">"padding"</span> child property</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pack_type</code></em> :</span></p></td>
<td>the new value of the <span class="type">"pack-type"</span> child property</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="gtk3-GtkBox.see-also"></a><h2>See Also</h2>
<a class="link" href="gtk3-GtkHBox.html#GtkHBox" title="struct GtkHBox"><span class="type">GtkHBox</span></a>, <a class="link" href="gtk3-GtkVBox.html#GtkVBox" title="struct GtkVBox"><span class="type">GtkVBox</span></a>, <a class="link" href="gtk3-GtkFrame.html#GtkFrame" title="struct GtkFrame"><span class="type">GtkFrame</span></a>, <a class="link" href="gtk3-GtkTable.html#GtkTable" title="struct GtkTable"><span class="type">GtkTable</span></a>, <a class="link" href="gtk3-GtkLayout.html#GtkLayout" title="struct GtkLayout"><span class="type">GtkLayout</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>